package com.itcj.dmp.utils

import org.apache.kudu.spark.kudu.KuduContext
import org.apache.spark.sql.SparkSession

object ReadKudu {
  def main(args: Array[String]): Unit = {

    import com.itcj.dmp.utils.KuduHelper._
    import com.itcj.dmp.utils.SparkConfigHelper._
    val sparkSession: SparkSession =SparkSession.builder().master("local[2]").appName("ReadKudu")
      .loadConfig().getOrCreate()
    val tablename="ODS_Tags20190722"
    val mf = sparkSession.readKuduTable(tablename)
    mf.get.show()

   /* val kuduContext = new KuduContext("node02:7051,node03:7051", sparkSession.sparkContext)
    kuduContext.deleteTable(tablename)*/
  }



}
